/**
 * 
 */
package com.fsharemobile.client;

import java.util.List;
import java.util.Map;

/**
 * @author RAD-Dungtm9
 * 
 */
public class HttpResponse {

	private Map<String, List<String>> headerFields;

	private byte[] body = null;

	int httpCode = 0;

	/**
	 * @return the addedHeaderFields
	 */
	public Map<String, List<String>> getHeaderFields() {
		return headerFields;
	}

	/**
	 * @param addedHeaderFields
	 *            the addedHeaderFields to set
	 */
	public void setHeaderFields(Map<String, List<String>> addedHeaderFields) {
		this.headerFields = addedHeaderFields;
	}

	/**
	 * @return the body
	 */
	public byte[] getBody() {
		return body;
	}

	/**
	 * @param body
	 *            the body to set
	 */
	public void setBody(byte[] body) {
		this.body = body;
	}

	public String getBodyAsString() throws Exception {
		return new String(body, "UTF-8");
	}

	/**
	 * @return the httpCode
	 */
	public int getHttpCode() {
		return httpCode;
	}

	/**
	 * @param httpCode
	 *            the httpCode to set
	 */
	public void setHttpCode(int httpCode) {
		this.httpCode = httpCode;
	}

}
